Skip to content

fix(worker): bug-bash — forwarder batch halt, restore finalize ctx, deploy email slug - #77

Merged
mastermanas805 merged 1 commit into
masterfrom
fix/bugbash-worker-2026-06-02
Jun 2, 2026
Merged

fix(worker): bug-bash — forwarder batch halt, restore finalize ctx, deploy email slug#77
mastermanas805 merged 1 commit into
masterfrom
fix/bugbash-worker-2026-06-02

Conversation

@mastermanas805

Copy link
Copy Markdown
Member

Three confirmed bugs from the 2026-06-02 platform bug bash (multi-agent, adversarially verified).

P1 — forwarder silently drops email (event_email_forwarder.go): unsubscribe fail-closed used continue not break batchLoop; a later sendable row advanced the per-row cursor past the held row, stranding it forever during a transient DB blip. Now halts the batch. + multi-row regression test (single-row couldn't catch it).

P2 — successful restore marked failed (customer_restore_runner.go): finalize UPDATE used parentCtx, so a worker shutdown after pg_restore succeeded recorded the restore as failed. Now uses a detached context.Background()+10s like the backup runner's P2-W4 fix.

P3 — deploy email slug-as-name (lifecycle_emails.go, regression in today's deploy-email work): the opaque hex app_id rendered as a prose deployment name. Now a labeled App identifier only; subjects generic. Mirrors the deploy-TTL builders.

Local: build + vet + internal/jobs tests green. 🤖 Generated with Claude Code

…ctx, deploy email slug

Three bugs from the 2026-06-02 platform bug bash:

- event_email_forwarder: the unsubscribe fail-CLOSED branch used `continue`
  instead of `break batchLoop`. Because the cursor is advanced per-row inline
  (unconditional Set, not max), a later sendable row in the same batch advanced
  the watermark PAST the held row — stranding it forever and silently dropping
  a legitimate transactional email during a transient unsubscribe-lookup DB
  blip. Now halts the batch like the SendClassTransient case. Adds a multi-row
  regression test (the single-row test couldn't distinguish continue/break).

- customer_restore_runner: the finalize UPDATE used parentCtx, so a worker
  shutdown (rolling deploy / drain) after pg_restore succeeded would fail the
  UPDATE and mark a SUCCESSFUL restore as 'failed'. Now uses a fresh
  context.Background()+10s like the customer_backup_runner P2-W4 fix.

- lifecycle_emails (deploy.created/healthy, shipped earlier today): the opaque
  8-char hex app_id slug was rendered as a prose deployment "name" in the
  subject. Now shown only as a labeled `App` identifier in the body (the live
  URL identifies the app); subjects are generic. Mirrors the deploy-TTL
  builders that deliberately avoid app_id-as-name.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mastermanas805
mastermanas805 enabled auto-merge (squash) June 2, 2026 16:33
@mastermanas805
mastermanas805 merged commit 072103f into master Jun 2, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant